home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kit PC World De Ampliacion De Windows 95
/
Kit PC World de ampliacion de Windows 95.iso
/
internet
/
sweeper
/
samples
/
olecon~1
/
controls
/
circle
/
circle~1.h
< prev
next >
Wrap
Text File
|
1995-11-25
|
3KB
|
115 lines
//=--------------------------------------------------------------------------=
// CircleCtl.H
//=--------------------------------------------------------------------------=
// Copyright 1995 Microsoft Corporation. All Rights Reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//=--------------------------------------------------------------------------=
//
// class declaration for the Circle control.
//
#ifndef _CIRCLECONTROL_H_
#include "IPServer.H"
#include "CtrlObj.H"
#include "CircleInterfaces.H"
#include "Dispids.H"
typedef struct tagCIRCLECTLSTATE {
// TOOD: put state variables here, and probably get rid of fGarbage, unless
// you have a real need for it
//
VARIANT_BOOL fGarbage;
} CIRCLECTLSTATE;
//=--------------------------------------------------------------------------=
// CCircleControl
//=--------------------------------------------------------------------------=
// our control.
//
class CCircleControl : public COleControl, public ICircle, public ISupportErrorInfo {
public:
// IUnknown methods
//
DECLARE_STANDARD_UNKNOWN();
// IDispatch methods
//
DECLARE_STANDARD_DISPATCH();
// ISupportErrorInfo methods
//
DECLARE_STANDARD_SUPPORTERRORINFO();
// ICircle methods
//
// TODO: copy over the method declarations from CircleInterfaces.H
// don't forget to remove the PURE from them.
//
STDMETHOD_(void, AboutBox)(THIS);
// OLE Control stuff follows:
//
CCircleControl(IUnknown *pUnkOuter);
virtual ~CCircleControl();
// static creation function. all controls must have one of these!
//
static IUnknown *Create(IUnknown *);
private:
// overridables that the control must implement.
//
STDMETHOD(LoadBinaryState)(IStream *pStream);
STDMETHOD(SaveBinaryState)(IStream *pStream);
STDMETHOD(LoadTextState)(IPropertyBag *pPropertyBag, IErrorLog *pErrorLog);
STDMETHOD(SaveTextState)(IPropertyBag *pPropertyBag, BOOL fWriteDefault);
STDMETHOD(OnDraw)(HDC hdcDraw, LPCRECTL prcBounds, LPCRECTL prcWBounds, HDC hicTargetDev);
virtual LRESULT WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
virtual BOOL RegisterClassData(void);
virtual HRESULT InternalQueryInterface(REFIID, void **);
virtual void BeforeCreateWindow(void);
virtual HRESULT DoCustomVerb(LONG lVerb);
// private state information.
//
CIRCLECTLSTATE m_state;
};
// TODO: if you have an array of verbs, then add an extern here with the name
// of it, so that you can include it in the DEFINE_CONTROLOBJECT.
// ie. extern VERBINFO m_CircleCustomVerbs [];
//
extern VERBINFO rgCircleCustomVerbs [];
DEFINE_CONTROLOBJECT(Circle,
&CLSID_Circle,
"CircleCtl",
CCircleControl::Create,
1,
&IID_ICircle,
"Circle.HLP",
&DIID_DCircleEvents,
OLEMISC_SETCLIENTSITEFIRST|OLEMISC_ACTIVATEWHENVISIBLE|OLEMISC_RECOMPOSEONRESIZE|OLEMISC_CANTLINKINSIDE|OLEMISC_INSIDEOUT,
RESID_TOOLBOX_BITMAP,
"CircleWndClass",
0,
NULL,
1,
rgCircleCustomVerbs);
#define _CIRCLECONTROL_H_
#endif // _CIRCLECONTROL_H_